package hy.service.impl;

import bean.UserAddress;
import service.UserService;

public class US_stub implements UserService {
    UserService service;//指向dubbo代理类
    //必须提供这个参数的构造方法
    public US_stub(UserService service) {
        this.service = service;
    }

    public UserAddress getUserAddress(String userId) {
        System.out.println("调用本地存根");
        if(userId.equals("001")||userId.equals("002")){
            return service.getUserAddress(userId);
        }
        return null;
    }
}